package com.song.storm_demo.hbase_chap8;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.UUID;

import org.apache.commons.io.IOUtils;

public class ProduceFileData {

	
	
	public static void main(String[] args)
	{
		StringBuffer sb = new StringBuffer();
		for(int i = 0; i<10000;i++)
		{
			int id = i %100;
			String uuid = UUID.randomUUID().toString();
			long timestrap =  System.currentTimeMillis();
			sb.append(id+"\t"+uuid+"\t"+timestrap+"\n");
		}
		
		try {
			IOUtils.write(sb.toString(), new FileOutputStream(new File("./data/data1")));
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		
		
		
	}
	
	
}
